Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Downward API for Namespace #42

Merged
merged 2 commits into from
May 2, 2023

Conversation

razo7
Copy link
Member

@razo7 razo7 commented May 1, 2023

Downward API simplifies the code by getting the pod's namespace without hard code the value. It stores the pod's namespace in environment variable - DEPLOYMENT_NAMESPACE as it was suggested earlier in #16.

Fix ECOPROJECT-1234

Downward API simplifies the code by getting the pod's namespace without hard code it
@openshift-ci openshift-ci bot requested review from clobrano and mshitrit May 1, 2023 09:15
@openshift-ci openshift-ci bot added the approved label May 1, 2023
pkg/utils/namespaces.go Outdated Show resolved Hide resolved
pkg/utils/namespaces.go Outdated Show resolved Hide resolved
controllers/fenceagentsremediation_controller_test.go Outdated Show resolved Hide resolved
controllers/fenceagentsremediation_controller.go Outdated Show resolved Hide resolved
pkg/utils/namespaces.go Outdated Show resolved Hide resolved
Instead of hard code the namespace of where the operator is installed just fetch the environment variable OPERATOR_NS so FAR CRs will be created on the same namespace that FAR operator has been installed
@openshift-ci openshift-ci bot added the lgtm label May 2, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7, slintes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 61535fd into medik8s:main May 2, 2023
razo7 added a commit to razo7/fence-agents-remediation that referenced this pull request May 2, 2023
PR medik8s#42 add downward API which makes some code redundant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants